<template>
    <div id="TextOsAlertList" ref="TextOsAlertList" class="TextOsAlertList">
        <div class="textLable">
            <span style="color: rgb(229, 230, 250)">主机告警信息：</span>
        </div>
    </div>
</template>>

<script>
import { fetchData } from '@/api/index.js';
import bus from 'common/bus.js';

export default {
    data() {
        return {
            postData: {
                opera: 'osalertlist',
                curPage: 1,
                pageSize: 20,
                sort: {
                    sortColumn: '',
                    sortOrders: ''
                },
                filtersType: 'fuzzyquery',
                filters: {
                    "monid": "9B86A82E27A3473F9D0F1DF46C9A6790",
                },
            },
            systemName: '',
            instanceName: '',
            databaseTime: '',
            referenceTime: '',
            timeDifference: '',
            TextOsAlertList: {},
            timerName: 'TextOsAlertList',
            timerEventName: 'timerTextOsAlertList',
            timerInterval: 1000 * 60
        }
    },
    created() {
        this.getData();
        bus.$emit('timerNewTodo', {
            name: this.timerName,
            eventName: this.timerEventName,
            interval: this.timerInterval,
            intervalNow: 0
        });

        bus.$on(this.timerEventName, msg => {
            if (msg.isGetData) {
                this.getData();
            }
        });
    },
    mounted() {
        
    },
    computed: {
        postDataFn() {
            return {
                postData : JSON.stringify(this.postData)
            }
        }
    },
    methods: {
        getData(){
            fetchData(
                this.postDataFn
            ).then((res) => {
                
            });
        }
    },
    beforeDestroy() {
        bus.$emit('timerNewTodo', {
            name: this.timerName
        });
    },
    watch:{
        
    }
}
</script>

<style scoped>
.TextOsAlertList{
    height: 60px;
    /* border : 5px solid red */

}
.textLable{
    padding: 10px;
}
</style>